package vip.mengqin.diandezhun.ui.activity;

import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import com.android.baselibrary.view.Comm_HeadView;
import com.android.baselibrary.view.MultiStateView;
import com.android.commcount.R2;
import com.android.commcount.adapter.FragmentViewPagerAdapter;
import com.android.commcount.ui.fragment.CommCount_Record_FormFragment;
import com.android.commcount.ui.fragment.CommCount_Record_HistoryFragment;
import com.google.android.material.tabs.TabLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import vip.mengqin.diandezhun.R;
import vip.mengqin.diandezhun.ui.fragment.Mine_MyInvoice_Tab1Fragment;

/**
 * 我的发票
 */
public class Mine_MyInvoiceActivity extends BaseActivity {

    @BindView(R.id.multiplestatusView)
    MultiStateView multiplestatusView;
    @BindView(R.id.comm_title)
    Comm_HeadView comm_title;

    @BindView(R.id.tabs)
    TabLayout tabs;
    @BindView(R.id.viewpager)
    ViewPager viewpager;

    List<Fragment> fragments = new ArrayList<>();
    List<String> titleList = new ArrayList<>();

    @Override
    protected int getLayoutId() {
        return R.layout.activity_myinvoice;
    }

    @Override
    protected void initView() {
        comm_title.setTitle("我的发票");

        titleList.add("可开票订单");
        titleList.add("已开票订单");

        Mine_MyInvoice_Tab1Fragment fragment1 = new Mine_MyInvoice_Tab1Fragment();
        Mine_MyInvoice_Tab1Fragment fragment2 = new Mine_MyInvoice_Tab1Fragment();
        fragments.add(fragment1);
        fragments.add(fragment2);

        FragmentViewPagerAdapter viewPagerAdapter = new FragmentViewPagerAdapter(getSupportFragmentManager(), fragments, titleList);
        viewpager.setAdapter(viewPagerAdapter);
        tabs.setupWithViewPager(viewpager);
        viewpager.setOffscreenPageLimit(5);
    }

    @Override
    protected void initData() {

    }

//    @OnClick({R.id.tv_sendcode})
//    public void onViewClicked(View view) {
//        switch (view.getId()) {
//            case R.id.tv_sendcode:
//                break;
//        }
//    }

}
